function structure = struct_str2double(structure)
    if ischar(structure)
        structure = str2double(structure);
    else
        fn = fieldnames(structure);
        for i = 1:length(fn)
            if ischar (structure.(fn{i}) )
                fprintf('ischar!\n');
                structure.(fn{i}) = str2double( structure.(fn{i}) );
            elseif isstruct( structure.(fn{i}) )
                fprintf('isstruct!\n');
                if length(structure.(fn{i}) ) == 1
                     structure.(fn{i}) = struct_str2double( structure.(fn{i}) );
                end    
            elseif iscell( structure.(fn{i}) )
                fprintf('iscell!\n');
                for j = 1:length(structure.(fn{i}) )
                    structure.(fn{i}){j} = struct_str2double( structure.(fn{i}){j} );
                end%for
            end%if
        end%for
    end%if
end%function